from app.serve.wtrees.base import BaseModel
from sqlalchemy import Column, Index, Integer


class GroupPermissionModel(BaseModel):
    __tablename__ = "wtrees_group_permission"
    __table_args__ = (Index("group_id_permission_id", "group_id", "permission_id"),)

    id = Column(Integer(), primary_key=True)
    group_id = Column(Integer(), nullable=False, comment="分组id")
    permission_id = Column(Integer(), nullable=False, comment="权限id")
